﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="register.aspx.cs" Inherits="SensorNetworkUI._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <link href="css/ui-lightness/jquery-ui-1.8.11.custom.css" rel="Stylesheet" type="text/css" />
<script type="text/javascript" src = "js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.11.custom.min.js"></script>
	<script type="text/javascript">
	    $(function () {

	        // Accordion
	        $("#accordion").accordion({ header: "h3" });

	        // Tabs
	        $('#tabs').tabs();


	        // Dialog			
	        $('#dialog').dialog({
	            autoOpen: false,
	            width: 600,
	            buttons: {
	                "Ok": function () {
	                    $(this).dialog("close");
	                },
	                "Cancel": function () {
	                    $(this).dialog("close");
	                }
	            }
	        });

	        // Dialog Link
	        $('#dialog_link').click(function () {
	            $('#dialog').dialog('open');
	            return false;
	        });

	        // Datepicker
	        $('#datepicker').datepicker({
	            inline: true
	        });

	        // Slider
	        $('#slider').slider({
	            range: true,
	            values: [17, 67]
	        });

	        // Progressbar
	        $("#progressbar").progressbar({
	            value: 20
	        });

	        //hover states on the static widgets
	        $('#dialog_link, ul#icons li').hover(
					function () { $(this).addClass('ui-state-hover'); },
					function () { $(this).removeClass('ui-state-hover'); }
				);

	    });
		</script>
        	<style type="text/css">
			/*demo page css*/
			body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;}
			.demoHeaders { margin-top: 2em; }
			#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
			#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
			ul#icons {margin: 0; padding: 0;}
			ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
			ul#icons span.ui-icon {float: left; margin: 0 4px;}
		</style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Register your account</h2>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" 
    ValidationGroup="registergroup" />
<p>
        Username&nbsp;
        <asp:TextBox ID="TextBox1" runat="server" CausesValidation="True" 
            ValidationGroup="registergroup"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            ControlToValidate="TextBox1" ErrorMessage="Username should be an Email Address" 
            ForeColor="Red" 
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
            ValidationGroup="registergroup"></asp:RegularExpressionValidator>
</p>
<p>
        Password&nbsp;
        <asp:TextBox ID="TextBox5" runat="server" CausesValidation="True" 
            ValidationGroup="registergroup" TextMode="Password"></asp:TextBox>
</p>
<p>
        Confirm Password&nbsp;
        <asp:TextBox ID="TextBox6" runat="server" CausesValidation="True" 
            ValidationGroup="registergroup" ontextchanged="TextBox6_TextChanged" 
            TextMode="Password"></asp:TextBox>
        <asp:CompareValidator ID="CompareValidator1" runat="server" 
            ControlToCompare="TextBox5" ControlToValidate="TextBox6" 
            ErrorMessage="Passwords do not match" ValidationGroup="registergroup"></asp:CompareValidator>
</p>
    <p>
        &nbsp;</p>
<p>
        First Name&nbsp;
         <asp:TextBox ID="TextBox2" runat="server" ValidationGroup="registergroup"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="TextBox2" ErrorMessage="First Name is Required" 
            ForeColor="Red" ValidationGroup="registergroup"></asp:RequiredFieldValidator>
</p>
<p>
        Last Name&nbsp;
        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ControlToValidate="TextBox3" ErrorMessage="Last name is required" 
            ForeColor="Red" ValidationGroup="registergroup"></asp:RequiredFieldValidator>
</p>
<p>
        Nickname&nbsp;
        <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
            ControlToValidate="TextBox4" ErrorMessage="Please enter a nickname" 
            ForeColor="Red" ValidationGroup="registergroup"></asp:RequiredFieldValidator>
</p>
<p>
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Submit" />
</p>


    </asp:Content>
